package xyz.xtt.equity.api.dto;

import java.util.Objects;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PackageDto {

	private Long packageId;
	private String packageName;

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		PackageDto that = (PackageDto) o;

		if (!packageId.equals(that.packageId))
			return false;
		return Objects.equals(packageName, that.packageName);
	}

	@Override
	public int hashCode() {
		int result = packageId.hashCode();
		result = 31 * result + (packageName != null ? packageName.hashCode() : 0);
		return result;
	}
}
